var o = require("./utils/util.js");

App({
    com: o,
    onLaunch: function() {
        o.post("wx/config/wxapp", {}, function(o) {
            0 === o.errno && (wx.setStorageSync("wxapp", o.data), wx.setNavigationBarTitle({
                title: o.data.navbarTitle
            }), wx.setNavigationBarColor({
                frontColor: o.data.navbarFrontColor,
                backgroundColor: o.data.navbarBackColor
            }));
        });
    },
    globalData: {
        userInfo: null
    },
    isPhoneExist: function(o) {
        if (wx.getStorageSync("phone")) return !0;
        "redirectTo" == o ? wx.redirectTo({
            url: "/pages/login/login"
        }) : wx.showModal({
            title: "提示",
            content: "您还没有登录，是否前往登录",
            confirmText: "前往登录",
            cancelText: "我再看看",
            success: function(o) {
                o.confirm && wx.navigateTo({
                    url: "/pages/login/login"
                });
            }
        });
    }
});